package com.czh.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.czh.domain.ResponseResult;
import com.czh.domain.dto.AddArticleDto;
import com.czh.domain.dto.QueryArticleDto;
import com.czh.domain.entity.Article;
import com.czh.domain.vo.*;

import java.util.List;

public interface ArticleService extends IService<Article> {
    /**
     * user
     */
    ResponseResult<List<HotArticleVo>> hotArticleList();

    ResponseResult<ArticlePageVo<ArticleShowVo>> articleList(Integer pageNum, Integer pageSize, Long categoryId);

    ResponseResult<ArticleShowDetailVo> getArticleDetail(Long id);

    ResponseResult<Object> updateViewCount(Long id);

    /**
     * admin
     */
    ResponseResult<Object> addArticle(AddArticleDto addArticleDto);
    ResponseResult<ArticlePageVo<ArticleManageVo>> pageArticleList(Integer pageNum, Integer pageSize, QueryArticleDto queryArticleDto);

    ResponseResult<ArticleManageDetailVo> getArticleManageDetail(Long id);

    ResponseResult<Object> deleteArticle(Long id);

    ResponseResult<Object> updateArticle(Article article);
}
